home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…rary 7 (Internal Edition) / Apple R&P Lib Internal v7.0.iso / 5-Fonts & Software / Macintosh Yellow Pages 2.0 / Macintosh Yellow Pages 2.0 / background_27953.txt < prev    next >
Text File  |  1991-03-12  |  30KB  |  1,195 lines

  1. -- background: 27953 from stack: in.0
  2. -- bmap block id: 28279
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Directory
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global viewTime
  9.   put the seconds into viewTime
  10. end openCard
  11.  
  12. on returnKey
  13.   global stringToFind
  14.   if the visible of msg is true or stringToFind is empty then
  15.     pass returnKey
  16.   else
  17.     if the foundText is not empty then
  18.  
  19.       --------
  20.       put the short ID of this card into tempMemory
  21.  
  22.       set the cursor to watch
  23.       set lockScreen to true
  24.       find string stringToFind
  25.       if the result is "not found" then
  26.         -- THE STRING DOES NOT OCCUR IN THE ENTIRE STACK.
  27.         play stop
  28.         play harpsichord a7t a ae
  29.         answer "No such text found." with "OK"
  30.         play harpsichord a7t ae
  31.       else
  32.         -- THE STRING OCCURS, BUT MIGHT BE IN THE WRONG BKGND.
  33.         if the short name of this bkgnd is "Directory" then
  34.           -- THE STRING IS IN THE RIGHT BKGND.
  35.           play stop
  36.           play harpsichord a7t ae
  37.           global undoMemory
  38.           put tempMemory into undoMemory
  39.           set lockScreen to false
  40.  
  41.           put last char of the short name of word 6 to 8 of the foundChunk into foundCell
  42.           put "Product-" before foundCell
  43.  
  44.           if word 6 of the foundChunk is "bkgnd" then
  45.             repeat for 4 times
  46.               if the hilite of bkgnd button foundCell is true then
  47.                 set the hilite of bkgnd button foundCell to false
  48.               else
  49.                 set the hilite of bkgnd button foundCell to true
  50.               end if
  51.             end repeat
  52.           end if
  53.  
  54.         else
  55.           -- THE STRING IS IN THE WRONG BKGND.
  56.           put the short ID of this card into repeatMark
  57.  
  58.           go to next card
  59.           -- THE RIGHT STRING IN RIGHT BKGND STILL NEED TO BE FOUND.
  60.           repeat until the short ID of this card = repeatMark
  61.             find string stringToFind
  62.             if the short name of this bkgnd is "Directory" then
  63.               -- THE STRING IS FOUND AND IS IN THE RIGHT BKGND.
  64.               play stop
  65.               play harpsichord a7t ae
  66.               global undoMemory
  67.               put tempMemory into undoMemory
  68.               set lockScreen to false
  69.  
  70.               put last char of the short name of word 6 to 8 of the foundChunk into foundCell
  71.               put "Product-" before foundCell
  72.  
  73.               if word 6 of the foundChunk is "bkgnd" then
  74.                 repeat for 4 times
  75.                   if the hilite of bkgnd button foundCell is true then
  76.                     set the hilite of bkgnd button foundCell to false
  77.                   else
  78.                     set the hilite of bkgnd button foundCell to true
  79.                   end if
  80.                 end repeat
  81.               end if
  82.  
  83.               exit returnKey
  84.             end if
  85.           end repeat
  86.           -- THE STRING ONLY OCCURS IN THE WRONG BKGND, AND NOWHERE ELSE.
  87.           --put tempMemory
  88.           --put "*"&repeatMark after msg
  89.           go to card ID tempMemory
  90.           play stop
  91.           play harpsichord a7t a ae
  92.           answer "No such text found." with "OK"
  93.           play harpsichord a7t ae
  94.         end if
  95.       end if
  96.  
  97.       --------
  98.  
  99.     end if
  100.   end if
  101. end returnKey
  102.  
  103. on find
  104.   if the visible of msg is true then
  105.     show msg
  106.   end if
  107.   pass find
  108. end find
  109.  
  110. on arrowKey buttonPressed
  111.   if buttonPressed is "up" then
  112.     go to card "First Page"
  113.   else if buttonPressed is "down" then
  114.     go to card "Last Page"
  115.   else
  116.     pass arrowKey
  117.   end if
  118. end arrowKey
  119.  
  120. on doMenu action
  121.   if action is "Prev" then
  122.     go to prev card
  123.   else if action is "Next" then
  124.     go to next card
  125.   else if action is "First" then
  126.     go to card "First Page"
  127.   else if action is "Last" then
  128.     go to card "Last Page"
  129.   else if action is "Find..." then
  130.     send mouseUp to bkgnd button "Find"
  131.   else if action is "Text Style..." then
  132.     send mouseUp to bkgnd button "Table of Contents"
  133.   else
  134.     pass doMenu
  135.   end if
  136. end doMenu
  137.  
  138. on help
  139.   send mouseUp to bkgnd button "Help"
  140. end help
  141.  
  142. on setSearchDomain
  143.   beep 3
  144. end setSearchDomain
  145.  
  146.  
  147.  
  148. -- part 23 (field)
  149. -- low flags: 01
  150. -- high flags: 0000
  151. -- rect: left=3 top=38 right=54 bottom=169
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 0
  155. -- font id: 20
  156. -- text size: 12
  157. -- style flags: 1024
  158. -- line height: 16
  159. -- part name: Product-1
  160.  
  161.  
  162. -- part 25 (field)
  163. -- low flags: 01
  164. -- high flags: 0000
  165. -- rect: left=3 top=54 right=134 bottom=169
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 0
  169. -- font id: 20
  170. -- text size: 12
  171. -- style flags: 0
  172. -- line height: 16
  173. -- part name: Description-1
  174.  
  175.  
  176. -- part 26 (field)
  177. -- low flags: 01
  178. -- high flags: 0000
  179. -- rect: left=3 top=134 right=150 bottom=169
  180. -- title width / last selected line: 0
  181. -- icon id / first selected line: 0 / 0
  182. -- text alignment: 0
  183. -- font id: 20
  184. -- text size: 12
  185. -- style flags: 0
  186. -- line height: 16
  187. -- part name: Price-1
  188.  
  189.  
  190. -- part 27 (field)
  191. -- low flags: 01
  192. -- high flags: 0000
  193. -- rect: left=3 top=150 right=166 bottom=169
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 0
  197. -- font id: 20
  198. -- text size: 12
  199. -- style flags: 0
  200. -- line height: 16
  201. -- part name: Memory-1
  202.  
  203.  
  204. -- part 28 (field)
  205. -- low flags: 01
  206. -- high flags: 0000
  207. -- rect: left=3 top=182 right=198 bottom=169
  208. -- title width / last selected line: 0
  209. -- icon id / first selected line: 0 / 0
  210. -- text alignment: 0
  211. -- font id: 20
  212. -- text size: 12
  213. -- style flags: 0
  214. -- line height: 16
  215. -- part name: Company-1
  216.  
  217.  
  218. -- part 29 (field)
  219. -- low flags: 01
  220. -- high flags: 0000
  221. -- rect: left=3 top=198 right=214 bottom=169
  222. -- title width / last selected line: 0
  223. -- icon id / first selected line: 0 / 0
  224. -- text alignment: 0
  225. -- font id: 20
  226. -- text size: 12
  227. -- style flags: 0
  228. -- line height: 16
  229. -- part name: Phone-1
  230.  
  231.  
  232. -- part 110 (field)
  233. -- low flags: 01
  234. -- high flags: 0000
  235. -- rect: left=3 top=230 right=294 bottom=169
  236. -- title width / last selected line: 0
  237. -- icon id / first selected line: 0 / 0
  238. -- text alignment: 0
  239. -- font id: 20
  240. -- text size: 12
  241. -- style flags: 0
  242. -- line height: 16
  243. -- part name: Review-1
  244.  
  245.  
  246. -- part 30 (field)
  247. -- low flags: 01
  248. -- high flags: 0000
  249. -- rect: left=174 top=38 right=54 bottom=340
  250. -- title width / last selected line: 0
  251. -- icon id / first selected line: 0 / 0
  252. -- text alignment: 0
  253. -- font id: 20
  254. -- text size: 12
  255. -- style flags: 1024
  256. -- line height: 16
  257. -- part name: Product-2
  258.  
  259.  
  260. -- part 31 (field)
  261. -- low flags: 01
  262. -- high flags: 0000
  263. -- rect: left=174 top=54 right=134 bottom=340
  264. -- title width / last selected line: 0
  265. -- icon id / first selected line: 0 / 0
  266. -- text alignment: 0
  267. -- font id: 20
  268. -- text size: 12
  269. -- style flags: 0
  270. -- line height: 16
  271. -- part name: Description-2
  272.  
  273.  
  274. -- part 32 (field)
  275. -- low flags: 01
  276. -- high flags: 0000
  277. -- rect: left=174 top=134 right=150 bottom=340
  278. -- title width / last selected line: 0
  279. -- icon id / first selected line: 0 / 0
  280. -- text alignment: 0
  281. -- font id: 20
  282. -- text size: 12
  283. -- style flags: 0
  284. -- line height: 16
  285. -- part name: Price-2
  286.  
  287.  
  288. -- part 33 (field)
  289. -- low flags: 01
  290. -- high flags: 0000
  291. -- rect: left=174 top=150 right=166 bottom=340
  292. -- title width / last selected line: 0
  293. -- icon id / first selected line: 0 / 0
  294. -- text alignment: 0
  295. -- font id: 20
  296. -- text size: 12
  297. -- style flags: 0
  298. -- line height: 16
  299. -- part name: Memory-2
  300.  
  301.  
  302. -- part 34 (field)
  303. -- low flags: 01
  304. -- high flags: 0000
  305. -- rect: left=174 top=182 right=198 bottom=340
  306. -- title width / last selected line: 0
  307. -- icon id / first selected line: 0 / 0
  308. -- text alignment: 0
  309. -- font id: 20
  310. -- text size: 12
  311. -- style flags: 0
  312. -- line height: 16
  313. -- part name: Company-2
  314.  
  315.  
  316. -- part 35 (field)
  317. -- low flags: 01
  318. -- high flags: 0000
  319. -- rect: left=174 top=198 right=214 bottom=340
  320. -- title width / last selected line: 0
  321. -- icon id / first selected line: 0 / 0
  322. -- text alignment: 0
  323. -- font id: 20
  324. -- text size: 12
  325. -- style flags: 0
  326. -- line height: 16
  327. -- part name: Phone-2
  328.  
  329.  
  330. -- part 43 (field)
  331. -- low flags: 01
  332. -- high flags: 0000
  333. -- rect: left=174 top=230 right=294 bottom=340
  334. -- title width / last selected line: 0
  335. -- icon id / first selected line: 0 / 0
  336. -- text alignment: 0
  337. -- font id: 20
  338. -- text size: 12
  339. -- style flags: 0
  340. -- line height: 16
  341. -- part name: Review-2
  342.  
  343.  
  344. -- part 36 (field)
  345. -- low flags: 01
  346. -- high flags: 0000
  347. -- rect: left=345 top=38 right=54 bottom=511
  348. -- title width / last selected line: 0
  349. -- icon id / first selected line: 0 / 0
  350. -- text alignment: 0
  351. -- font id: 20
  352. -- text size: 12
  353. -- style flags: 1024
  354. -- line height: 16
  355. -- part name: Product-3
  356.  
  357.  
  358. -- part 37 (field)
  359. -- low flags: 01
  360. -- high flags: 0000
  361. -- rect: left=345 top=54 right=134 bottom=511
  362. -- title width / last selected line: 0
  363. -- icon id / first selected line: 0 / 0
  364. -- text alignment: 0
  365. -- font id: 20
  366. -- text size: 12
  367. -- style flags: 0
  368. -- line height: 16
  369. -- part name: Description-3
  370.  
  371.  
  372. -- part 38 (field)
  373. -- low flags: 01
  374. -- high flags: 0000
  375. -- rect: left=345 top=134 right=150 bottom=511
  376. -- title width / last selected line: 0
  377. -- icon id / first selected line: 0 / 0
  378. -- text alignment: 0
  379. -- font id: 20
  380. -- text size: 12
  381. -- style flags: 0
  382. -- line height: 16
  383. -- part name: Price-3
  384.  
  385.  
  386. -- part 39 (field)
  387. -- low flags: 01
  388. -- high flags: 0000
  389. -- rect: left=345 top=150 right=166 bottom=511
  390. -- title width / last selected line: 0
  391. -- icon id / first selected line: 0 / 0
  392. -- text alignment: 0
  393. -- font id: 20
  394. -- text size: 12
  395. -- style flags: 0
  396. -- line height: 16
  397. -- part name: Memory-3
  398.  
  399.  
  400. -- part 40 (field)
  401. -- low flags: 01
  402. -- high flags: 0000
  403. -- rect: left=345 top=182 right=198 bottom=511
  404. -- title width / last selected line: 0
  405. -- icon id / first selected line: 0 / 0
  406. -- text alignment: 0
  407. -- font id: 20
  408. -- text size: 12
  409. -- style flags: 0
  410. -- line height: 16
  411. -- part name: Company-3
  412.  
  413.  
  414. -- part 41 (field)
  415. -- low flags: 01
  416. -- high flags: 0000
  417. -- rect: left=345 top=198 right=214 bottom=511
  418. -- title width / last selected line: 0
  419. -- icon id / first selected line: 0 / 0
  420. -- text alignment: 0
  421. -- font id: 20
  422. -- text size: 12
  423. -- style flags: 0
  424. -- line height: 16
  425. -- part name: Phone-3
  426.  
  427.  
  428. -- part 57 (field)
  429. -- low flags: 01
  430. -- high flags: 0000
  431. -- rect: left=345 top=230 right=294 bottom=511
  432. -- title width / last selected line: 0
  433. -- icon id / first selected line: 0 / 0
  434. -- text alignment: 0
  435. -- font id: 20
  436. -- text size: 12
  437. -- style flags: 0
  438. -- line height: 16
  439. -- part name: Review-3
  440.  
  441.  
  442. -- part 1 (field)
  443. -- low flags: 01
  444. -- high flags: 0000
  445. -- rect: left=2 top=3 right=21 bottom=451
  446. -- title width / last selected line: 0
  447. -- icon id / first selected line: 0 / 0
  448. -- text alignment: 0
  449. -- font id: 20
  450. -- text size: 12
  451. -- style flags: 2304
  452. -- line height: 16
  453. -- part name: Header
  454.  
  455.  
  456. -- part 5 (field)
  457. -- low flags: 01
  458. -- high flags: 0000
  459. -- rect: left=343 top=3 right=20 bottom=510
  460. -- title width / last selected line: 0
  461. -- icon id / first selected line: 0 / 0
  462. -- text alignment: 65535
  463. -- font id: 20
  464. -- text size: 12
  465. -- style flags: 2304
  466. -- line height: 16
  467. -- part name: Page Number
  468.  
  469.  
  470. -- part 6 (button)
  471. -- low flags: 00
  472. -- high flags: 2000
  473. -- rect: left=12 top=305 right=337 bottom=48
  474. -- title width / last selected line: 0
  475. -- icon id / first selected line: 0 / 0
  476. -- text alignment: 1
  477. -- font id: 0
  478. -- text size: 12
  479. -- style flags: 0
  480. -- line height: 16
  481. -- part name: Help
  482. ----- HyperTalk script -----
  483. on mouseDown
  484.   play stop
  485.   play harpsichord a7e
  486. end mouseDown
  487.  
  488. on mouseUp
  489.   --put bkgnd field "Header" into H
  490.   --put bkgnd field "Page Number" into P
  491.   global undoMemory
  492.   put the name of this card into undoMemory
  493.   --set lockScreen to true
  494.   go to card "Help:  0"
  495.   --put H into bkgnd field "Header"
  496.   --put P into bkgnd field "Page Number"
  497.   --set lockScreen to false
  498.  
  499.   set the cursor to watch
  500.   --push card
  501.   --set lockScreen to true
  502.   --repeat for 25 times
  503.   --go to next card
  504.   --put H into bkgnd field "Header"
  505.   --put P into bkgnd field "Page Number"
  506.   --end repeat
  507.   --pop card
  508.   --set lockScreen to false
  509. end mouseUp
  510.  
  511.  
  512. -- part 7 (button)
  513. -- low flags: 00
  514. -- high flags: 2000
  515. -- rect: left=53 top=305 right=337 bottom=89
  516. -- title width / last selected line: 0
  517. -- icon id / first selected line: 0 / 0
  518. -- text alignment: 1
  519. -- font id: 0
  520. -- text size: 12
  521. -- style flags: 0
  522. -- line height: 16
  523. -- part name: Print
  524. ----- HyperTalk script -----
  525. on mouseDown
  526.   play stop
  527.   play harpsichord a7e
  528. end mouseDown
  529.  
  530. on mouseUp
  531.   answer "Print this page?" with "Cancel" or "OK"
  532.   if it is "OK" then
  533.     print this card
  534.   end if
  535. end mouseUp
  536.  
  537.  
  538.  
  539.  
  540. -- part 8 (button)
  541. -- low flags: 00
  542. -- high flags: 2000
  543. -- rect: left=94 top=305 right=337 bottom=130
  544. -- title width / last selected line: 0
  545. -- icon id / first selected line: 0 / 0
  546. -- text alignment: 1
  547. -- font id: 0
  548. -- text size: 12
  549. -- style flags: 0
  550. -- line height: 16
  551. -- part name: Copy
  552. ----- HyperTalk script -----
  553. on mouseDown
  554.   play stop
  555.   play harpsichord a7e
  556. end mouseDown
  557.  
  558. on mouseUp
  559.   answer "Copy which product information to clipboard?" with "Left" or "Center" or "Right"
  560.  
  561.   set cursor to watch
  562.   set lockScreen to true
  563.  
  564.   if it is "Left" then
  565.     put 1 into selectedProduct
  566.   else if it is "Center" then
  567.     put 2 into selectedProduct
  568.   else
  569.     put 3 into selectedProduct
  570.   end if
  571.  
  572.   put "Product-"&selectedProduct into fieldName
  573.   put bkgnd field fieldName into productInfo
  574.  
  575.   put "Description-"&selectedProduct into fieldName
  576.   put return&bkgnd field fieldName after productInfo
  577.  
  578.   put "Price-"&selectedProduct into fieldName
  579.   put return&bkgnd field fieldName after productInfo
  580.  
  581.   put "Memory-"&selectedProduct into fieldName
  582.   put return&bkgnd field fieldName after productInfo
  583.  
  584.   put "Company-"&selectedProduct into fieldName
  585.   put return&bkgnd field fieldName after productInfo
  586.  
  587.   put "Phone-"&selectedProduct into fieldName
  588.   put return&bkgnd field fieldName after productInfo
  589.  
  590.   put "Review-"&selectedProduct into fieldName
  591.   put return&bkgnd field fieldName after productInfo
  592.  
  593.   push card
  594.   go to card "Copy to Clipboard"
  595.   put productInfo into card field "Workbench"
  596.  
  597.   type tab
  598.   doMenu "copy text"
  599.   pop card
  600.  
  601.   set lockScreen to false
  602.  
  603.   put line 1 of productInfo into productName
  604.   if the length of productName > 20 then
  605.     put char 1 to 17 of productName into productName
  606.     put "..." after productName
  607.   end if
  608.   if productName = empty then
  609.     beep
  610.     answer "There is nothing to copy." with "OK"
  611.   else
  612.     answer quote& productName "e && "copied to clipboard." with "OK"
  613.   end if
  614. end mouseUp
  615.  
  616.  
  617. -- part 11 (button)
  618. -- low flags: 00
  619. -- high flags: 2000
  620. -- rect: left=176 top=305 right=337 bottom=212
  621. -- title width / last selected line: 0
  622. -- icon id / first selected line: 0 / 0
  623. -- text alignment: 1
  624. -- font id: 0
  625. -- text size: 12
  626. -- style flags: 0
  627. -- line height: 16
  628. -- part name: Find
  629. ----- HyperTalk script -----
  630. on mouseDown
  631.   play stop
  632.   play harpsichord a7e
  633. end mouseDown
  634.  
  635. on mouseUp
  636.   hide msg
  637.   global stringToFind, firstTimeFound
  638.   ask "Text to find:" with stringToFind
  639.   if it is not empty then
  640.     put it into stringToFind
  641.     put the short ID of this card into tempMemory
  642.     set the cursor to watch
  643.     set lockScreen to true
  644.  
  645.     find string stringToFind
  646.     if the result is "not found" then
  647.       -- THE STRING DOES NOT OCCUR IN THE ENTIRE STACK.
  648.       play stop
  649.       play harpsichord a7t a ae
  650.       answer quote&stringToFind"e&" not found." with "OK"
  651.       play harpsichord a7t ae
  652.     else
  653.       -- THE STRING OCCURS, BUT MIGHT BE IN THE WRONG BKGND.
  654.       if the short name of this bkgnd is "Directory" then
  655.         -- THE STRING IS IN THE RIGHT BKGND.
  656.         play stop
  657.         play harpsichord a7t ae
  658.         global undoMemory
  659.         put tempMemory into undoMemory
  660.         set lockScreen to false
  661.  
  662.         put last char of the short name of word 6 to 8 of the foundChunk into foundCell
  663.         put "Product-" before foundCell
  664.  
  665.         if word 6 of the foundChunk is "bkgnd" then
  666.           repeat for 6 times
  667.             if the hilite of bkgnd button foundCell is true then
  668.               set the hilite of bkgnd button foundCell to false
  669.             else
  670.               set the hilite of bkgnd button foundCell to true
  671.             end if
  672.           end repeat
  673.         end if
  674.  
  675.         if firstTimeFound then
  676.           answer "Keep on pressing RETURN to find next." with "OK"
  677.           put false into firstTimeFound
  678.         end if
  679.       else
  680.         -- THE STRING IS IN THE WRONG BKGND.
  681.         put the short ID of this card into repeatMark
  682.  
  683.  
  684.         --find string stringToFind
  685.         --if the short name of this bkgnd is "Directory" then
  686.         -- THE RIGHT STRING IN RIGHT BKGND IS FOUND IMMEDIATELY NEXT.
  687.         --play stop
  688.         --play harpsichord a7t ae
  689.         --global undoMemory
  690.         --put tempMemory into undoMemory
  691.         --if firstTimeFound then
  692.         --set lockScreen to false
  693.         --answer "Keep on pressing RETURN to find next." with "OK"
  694.         --put false into firstTimeFound
  695.         --end if
  696.         --exit mouseUp
  697.         --end if
  698.  
  699.  
  700.         -- THE RIGHT STRING IN RIGHT BKGND STILL NEED TO BE FOUND.
  701.         repeat until the short ID of this card = repeatMark
  702.           find string stringToFind
  703.           if the short name of this bkgnd is "Directory" then
  704.             -- THE STRING IS FOUND AND IS IN THE RIGHT BKGND.
  705.             play stop
  706.             play harpsichord a7t ae
  707.             global undoMemory
  708.             put tempMemory into undoMemory
  709.             set lockScreen to false
  710.  
  711.             put last char of the short name of word 6 to 8 of the foundChunk into foundCell
  712.             put "Product-" before foundCell
  713.  
  714.             if word 6 of the foundChunk is "bkgnd" then
  715.               repeat for 6 times
  716.                 if the hilite of bkgnd button foundCell is true then
  717.                   set the hilite of bkgnd button foundCell to false
  718.                 else
  719.                   set the hilite of bkgnd button foundCell to true
  720.                 end if
  721.               end repeat
  722.             end if
  723.  
  724.             if firstTimeFound then
  725.               answer "Keep on pressing RETURN to find next." with "OK"
  726.               put false into firstTimeFound
  727.             end if
  728.             exit mouseUp
  729.           end if
  730.         end repeat
  731.         -- THE STRING ONLY OCCURS IN THE WRONG BKGND, AND NOWHERE ELSE.
  732.         go to card ID tempMemory
  733.         play stop
  734.         play harpsichord a7t a ae
  735.         answer quote&stringToFind"e&" not found." with "OK"
  736.         play harpsichord a7t ae
  737.       end if
  738.     end if
  739.   end if
  740. end mouseUp
  741.  
  742.  
  743. -- part 9 (button)
  744. -- low flags: 00
  745. -- high flags: 2000
  746. -- rect: left=217 top=305 right=337 bottom=253
  747. -- title width / last selected line: 0
  748. -- icon id / first selected line: 0 / 0
  749. -- text alignment: 1
  750. -- font id: 0
  751. -- text size: 12
  752. -- style flags: 0
  753. -- line height: 16
  754. -- part name: Table of Contents
  755. ----- HyperTalk script -----
  756. on mouseDown
  757.   play stop
  758.   play harpsichord a7e
  759. end mouseDown
  760.  
  761. on mouseUp
  762.   global undoMemory
  763.   put the name of this card into undoMemory
  764.  
  765.   --put bkgnd field "Header" into category
  766.   --put offset(":", category)-1 into nameLength
  767.   --if nameLength < 0 then
  768.   --put length of category into nameLength
  769.   --end if
  770.   --put char 1 to nameLength of category into categorySection
  771.   --go to card "TOC:  "&categorySection
  772.   --if the result is not empty then
  773.   --beep
  774.   go to card "TOC:  Root"
  775.   --end if
  776.   set lockScreen to true
  777. end mouseUp
  778.  
  779.  
  780. -- part 12 (button)
  781. -- low flags: 00
  782. -- high flags: 0000
  783. -- rect: left=258 top=305 right=337 bottom=294
  784. -- title width / last selected line: 0
  785. -- icon id / first selected line: 0 / 0
  786. -- text alignment: 1
  787. -- font id: 0
  788. -- text size: 12
  789. -- style flags: 0
  790. -- line height: 16
  791. -- part name: Rewind
  792. ----- HyperTalk script -----
  793. on mouseUp
  794.   set the hilite of me to true
  795.   global undoMemory, increment, firstPage
  796.   put the name of this card into undoMemory
  797.   repeat forever
  798.     set the hilite of bkgnd button "Flashing Stop" to false
  799.     set the hilite of bkgnd button "Flashing Stop" to true
  800.     set the hilite of bkgnd button "Flashing Stop" to false
  801.     set the hilite of bkgnd button "Flashing Stop" to true
  802.     if the mouse is down then
  803.       put the mouseLoc into x
  804.       if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 258 and item 1 of x < 294 and item 2 of x > 305 and item 2 of x < 337) then
  805.         play stop
  806.         play harpsichord a7e
  807.         click at 341,306
  808.         set the hilite of bkgnd button "Rewind" to false
  809.         set the hilite of bkgnd button "Flashing Stop" to false
  810.         exit mouseUp
  811.       end if
  812.     end if
  813.     if the short name of this card is not "First Page" then
  814.       get the number of this card
  815.       subtract increment from it
  816.       if it < firstPage then
  817.         put firstPage into it
  818.       end if
  819.       if the mouse is down then
  820.         put the mouseLoc into x
  821.         if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 258 and item 1 of x < 294 and item 2 of x > 305 and item 2 of x < 337) then
  822.           play stop
  823.           play harpsichord a7e
  824.           click at 341,306
  825.           set the hilite of bkgnd button "Rewind" to false
  826.           set the hilite of bkgnd button "Flashing Stop" to false
  827.           exit mouseUp
  828.         end if
  829.       end if
  830.       set lockScreen to true
  831.       go to card it
  832.       set the hilite of me to true
  833.       set lockScreen to false
  834.       if the mouse is down then
  835.         put the mouseLoc into x
  836.         if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 258 and item 1 of x < 294 and item 2 of x > 305 and item 2 of x < 337) then
  837.           play stop
  838.           play harpsichord a7e
  839.           click at 341,306
  840.           set the hilite of bkgnd button "Rewind" to false
  841.           set the hilite of bkgnd button "Flashing Stop" to false
  842.           exit mouseUp
  843.         end if
  844.       end if
  845.     else
  846.       play stop
  847.       play harpsichord a7e
  848.       click at 341,306
  849.       set the hilite of bkgnd button "Rewind" to false
  850.       set the hilite of bkgnd button "Flashing Stop" to false
  851.       exit mouseUp
  852.     end if
  853.   end repeat
  854. end mouseUp
  855.  
  856. on mouseDown
  857.   play stop
  858.   play harpsichord a7e
  859. end mouseDown
  860.  
  861.  
  862.  
  863. -- part 20 (button)
  864. -- low flags: 00
  865. -- high flags: 2000
  866. -- rect: left=299 top=305 right=337 bottom=335
  867. -- title width / last selected line: 0
  868. -- icon id / first selected line: 0 / 0
  869. -- text alignment: 1
  870. -- font id: 0
  871. -- text size: 12
  872. -- style flags: 0
  873. -- line height: 16
  874. -- part name: Prev
  875. ----- HyperTalk script -----
  876. on mouseUp
  877.   global justFastScan
  878.   if not justFastScan then
  879.     if the short name of this card is not "First Page" then
  880.       global viewTime, waitTime, undoMemory
  881.       if the seconds - viewTime > waitTime then
  882.         put the name of this card into undoMemory
  883.       end if
  884.       visual effect scroll right very fast
  885.       go to prev card
  886.     else
  887.       play harpsichord a7t ae
  888.     end if
  889.   end if
  890. end mouseUp
  891.  
  892. on mouseDown
  893.   global justFastScan
  894.   put false into justFastScan
  895.   put the ticks into startTime
  896.   play stop
  897.   play harpsichord a7e
  898.  
  899.   -- holding down the key
  900.   repeat until the mouse is up
  901.     if the ticks > startTime+30 then
  902.       if the short name of this card is not "First Page" then
  903.         put true into justFastScan
  904.         set the lockScreen to true
  905.         go to prev card
  906.         set the hilite of me to true
  907.         set the lockScreen to false
  908.       else
  909.         play stop
  910.         play harpsichord a7t
  911.       end if
  912.     end if
  913.   end repeat
  914. end mouseDown
  915.  
  916.  
  917. -- part 14 (button)
  918. -- low flags: 00
  919. -- high flags: 2000
  920. -- rect: left=340 top=305 right=337 bottom=376
  921. -- title width / last selected line: 0
  922. -- icon id / first selected line: 0 / 0
  923. -- text alignment: 1
  924. -- font id: 0
  925. -- text size: 12
  926. -- style flags: 0
  927. -- line height: 16
  928. -- part name: Stop
  929. ----- HyperTalk script -----
  930. on mouseDown
  931.   play stop
  932.   play harpsichord a7e
  933.   set lockScreen to false
  934. end mouseDown
  935.  
  936.  
  937. -- part 17 (button)
  938. -- low flags: 00
  939. -- high flags: 0000
  940. -- rect: left=353 top=317 right=324 bottom=363
  941. -- title width / last selected line: 0
  942. -- icon id / first selected line: 0 / 0
  943. -- text alignment: 1
  944. -- font id: 0
  945. -- text size: 12
  946. -- style flags: 0
  947. -- line height: 16
  948. -- part name: Flashing Stop
  949. ----- HyperTalk script -----
  950. on mouseDown
  951.   click at 341,306
  952. end mouseDown
  953.  
  954.  
  955. -- part 19 (button)
  956. -- low flags: 00
  957. -- high flags: 2000
  958. -- rect: left=381 top=305 right=337 bottom=417
  959. -- title width / last selected line: 0
  960. -- icon id / first selected line: 0 / 0
  961. -- text alignment: 1
  962. -- font id: 0
  963. -- text size: 12
  964. -- style flags: 0
  965. -- line height: 16
  966. -- part name: Next
  967. ----- HyperTalk script -----
  968. on mouseUp
  969.   global justFastScan
  970.   if not justFastScan then
  971.     if the short name of this card is not "Last Page" then
  972.       global viewTime, waitTime, undoMemory
  973.       if the seconds - viewTime > waitTime then
  974.         put the name of this card into undoMemory
  975.       end if
  976.       visual effect scroll left very fast
  977.       go to next card
  978.     else
  979.       play harpsichord a7t ae
  980.     end if
  981.   end if
  982. end mouseUp
  983.  
  984. on mouseDown
  985.   global justFastScan
  986.   put false into justFastScan
  987.   put the ticks into startTime
  988.   play stop
  989.   play harpsichord a7e
  990.  
  991.   -- holding down the key
  992.   repeat until the mouse is up
  993.     if the ticks > startTime+30 then
  994.       if the short name of this card is not "Last Page" then
  995.         put true into justFastScan
  996.         set the lockScreen to true
  997.         go to next card
  998.         set the hilite of me to true
  999.         set the lockScreen to false
  1000.       else
  1001.         play stop
  1002.         play harpsichord a7t
  1003.       end if
  1004.     end if
  1005.   end repeat
  1006. end mouseDown
  1007.  
  1008.  
  1009.  
  1010. -- part 21 (button)
  1011. -- low flags: 00
  1012. -- high flags: 0000
  1013. -- rect: left=422 top=305 right=337 bottom=458
  1014. -- title width / last selected line: 0
  1015. -- icon id / first selected line: 0 / 0
  1016. -- text alignment: 1
  1017. -- font id: 0
  1018. -- text size: 12
  1019. -- style flags: 0
  1020. -- line height: 16
  1021. -- part name: Forward
  1022. ----- HyperTalk script -----
  1023. on mouseUp
  1024.   set the hilite of me to true
  1025.   global undoMemory, increment, lastPage
  1026.   put the name of this card into undoMemory
  1027.   repeat forever
  1028.     set the hilite of bkgnd button "Flashing Stop" to false
  1029.     set the hilite of bkgnd button "Flashing Stop" to true
  1030.     set the hilite of bkgnd button "Flashing Stop" to false
  1031.     set the hilite of bkgnd button "Flashing Stop" to true
  1032.     if the mouse is down then
  1033.       put the mouseLoc into x
  1034.       if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 422 and item 1 of x < 458 and item 2 of x > 305 and item 2 of x < 337) then
  1035.         play stop
  1036.         play harpsichord a7e
  1037.         click at 341,306
  1038.         set the hilite of bkgnd button "Forward" to false
  1039.         set the hilite of bkgnd button "Flashing Stop" to false
  1040.         exit mouseUp
  1041.       end if
  1042.     end if
  1043.     if the short name of this card is not "Last Page" then
  1044.       get the number of this card
  1045.       add increment to it
  1046.       if it > lastPage then
  1047.         put lastPage into it
  1048.       end if
  1049.       if the mouse is down then
  1050.         put the mouseLoc into x
  1051.         if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 422 and item 1 of x < 458 and item 2 of x > 305 and item 2 of x < 337) then
  1052.           play stop
  1053.           play harpsichord a7e
  1054.           click at 341,306
  1055.           set the hilite of bkgnd button "Forward" to false
  1056.           set the hilite of bkgnd button "Flashing Stop" to false
  1057.           exit mouseUp
  1058.         end if
  1059.       end if
  1060.       set lockScreen to true
  1061.       go to card it
  1062.       set the hilite of me to true
  1063.       set lockScreen to false
  1064.       if the mouse is down then
  1065.         put the mouseLoc into x
  1066.         if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 422 and item 1 of x < 458 and item 2 of x > 305 and item 2 of x < 337) then
  1067.           play stop
  1068.           play harpsichord a7e
  1069.           click at 341,306
  1070.           set the hilite of bkgnd button "Forward" to false
  1071.           set the hilite of bkgnd button "Flashing Stop" to false
  1072.           exit mouseUp
  1073.         end if
  1074.       end if
  1075.     else
  1076.       play stop
  1077.       play harpsichord a7e
  1078.       click at 341,306
  1079.       set the hilite of bkgnd button "Forward" to false
  1080.       set the hilite of bkgnd button "Flashing Stop" to false
  1081.       exit mouseUp
  1082.     end if
  1083.   end repeat
  1084. end mouseUp
  1085.  
  1086. on mouseDown
  1087.   play stop
  1088.   play harpsichord a7e
  1089. end mouseDown
  1090.  
  1091.  
  1092.  
  1093. -- part 10 (button)
  1094. -- low flags: 00
  1095. -- high flags: 2000
  1096. -- rect: left=463 top=305 right=337 bottom=499
  1097. -- title width / last selected line: 0
  1098. -- icon id / first selected line: 0 / 0
  1099. -- text alignment: 1
  1100. -- font id: 0
  1101. -- text size: 12
  1102. -- style flags: 0
  1103. -- line height: 16
  1104. -- part name: Contents
  1105. ----- HyperTalk script -----
  1106. on mouseDown
  1107.   play stop
  1108.   play harpsichord a7e
  1109. end mouseDown
  1110.  
  1111. on mouseUp
  1112.   global undoMemory, bookMark
  1113.   put the name of this card into undoMemory
  1114.   put the name of this card into bookMark
  1115.   visual effect iris close to black
  1116.   visual effect iris open
  1117.   go to card "Main Menu"
  1118. end mouseUp
  1119.  
  1120.  
  1121. -- part 69 (button)
  1122. -- low flags: 00
  1123. -- high flags: 0000
  1124. -- rect: left=3 top=27 right=39 bottom=167
  1125. -- title width / last selected line: 0
  1126. -- icon id / first selected line: 0 / 0
  1127. -- text alignment: 1
  1128. -- font id: 0
  1129. -- text size: 12
  1130. -- style flags: 0
  1131. -- line height: 16
  1132. -- part name: Product-1
  1133.  
  1134.  
  1135. -- part 81 (button)
  1136. -- low flags: 00
  1137. -- high flags: 0000
  1138. -- rect: left=174 top=27 right=39 bottom=338
  1139. -- title width / last selected line: 0
  1140. -- icon id / first selected line: 0 / 0
  1141. -- text alignment: 1
  1142. -- font id: 0
  1143. -- text size: 12
  1144. -- style flags: 0
  1145. -- line height: 16
  1146. -- part name: Product-2
  1147.  
  1148.  
  1149. -- part 93 (button)
  1150. -- low flags: 00
  1151. -- high flags: 0000
  1152. -- rect: left=345 top=27 right=39 bottom=509
  1153. -- title width / last selected line: 0
  1154. -- icon id / first selected line: 0 / 0
  1155. -- text alignment: 1
  1156. -- font id: 0
  1157. -- text size: 12
  1158. -- style flags: 0
  1159. -- line height: 16
  1160. -- part name: Product-3
  1161.  
  1162.  
  1163. -- part 105 (button)
  1164. -- low flags: 00
  1165. -- high flags: 0000
  1166. -- rect: left=2 top=3 right=21 bottom=437
  1167. -- title width / last selected line: 0
  1168. -- icon id / first selected line: 0 / 0
  1169. -- text alignment: 1
  1170. -- font id: 0
  1171. -- text size: 12
  1172. -- style flags: 0
  1173. -- line height: 16
  1174. -- part name: Header
  1175.  
  1176.  
  1177. -- part 107 (button)
  1178. -- low flags: 00
  1179. -- high flags: 0000
  1180. -- rect: left=438 top=3 right=21 bottom=509
  1181. -- title width / last selected line: 0
  1182. -- icon id / first selected line: 0 / 0
  1183. -- text alignment: 1
  1184. -- font id: 0
  1185. -- text size: 12
  1186. -- style flags: 0
  1187. -- line height: 16
  1188. -- part name: Page Number
  1189. ----- HyperTalk script -----
  1190. on mouseUp
  1191.   --ask "What page do you want to flip to?"
  1192.   --if it is not empty and then
  1193.   --end if
  1194. end mouseUp
  1195.